<template>
  <div class="slide-meau">
    <a-menu theme="dark" v-model:selectedKeys="selectedKeys">
      <a-menu-item v-for="item in menu" :key="item.path" @click="toPage(item.path)">
        <span>{{ item.name }}</span>
      </a-menu-item>
    </a-menu>
  </div>
  <router-view></router-view>
</template>

<script setup>
import {computed, ref} from "vue";
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
const menu = ref([
    {name:'函数管理',path:'/function'},
    { name:'版本管理',path:'/version'}
])
const selectedKeys = computed(()=>{
  return [route.path]
})

const toPage = (path)=>{
  router.push(path)
}
// This starter template is using Vue 3 experimental <script setup> SFCs
// Check out https://github.com/vuejs/rfcs/blob/script-setup-2/active-rfcs/0000-script-setup.md
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.slide-meau{
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow-y: hidden;
  position: fixed;
  right: 10px;
  top: 50%;
}
.ant-menu-item{
  margin: 0!important;
  height: 50px!important;
  line-height: 50px!important;
}
</style>
